package priv.wangy.micro.common.po.valid;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import priv.wangy.micro.common.po.valid.validator.UsccValidator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 统一社会信用代码校验
 *
 * @author zhangjq
 * @since 2024-03-06
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = UsccValidator.class)
public @interface Uscc {

    String message() default "不符合统一社会信用代码编码规则";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
